Skip to content

added script-no-first-blank-line option - #1131

Open
azimonti wants to merge 1 commit into
htacg:nextfrom
azimonti:script-no-first-blank-line
Open

added script-no-first-blank-line option#1131
azimonti wants to merge 1 commit into
htacg:nextfrom
azimonti:script-no-first-blank-line

Conversation

@azimonti

Copy link
Copy Markdown

Added a new option that is leaving unchanged the first line after script so that

  <script>

  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/service-worker.min.js', { scope: '/' })
        .catch(error => console.error('Service Worker registration failed:', error));
  }
  </script>

is not becoming (if tidy is called in-place 3 times)

  <script>




  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/service-worker.min.js', { scope: '/' })
        .catch(error => console.error('Service Worker registration failed:', error));
  }
  </script>

--script-no-first-blank-line is set to no by default (i.e. not changing the current behavior).

If I need to add test or any translation / file, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant